﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using System.Data.Entity;
using ALS.Repository.Contexts;
using ALS.Component.Data;

namespace ALS.Repository.UnitOfWorks
{
    /// <summary>
    /// Als操作类
    /// </summary>
    [Export("AlsUnitOfWork", typeof(IUnitOfWork))]
    public class AlsUnitOfWorkContext : UnitOfWorkContextBase
    {
        /// <summary>
        /// 获取或设置 当前使用的数据访问上下文对象
        /// </summary>
        protected override DbContext Context
        {
            get { return AlsDataContext; }
        }

        /// <summary>
        /// 获取或设置 默认的Als数据访问上下文对象
        /// </summary>
        [Import(typeof(DbContext))]
        public AlsDataContext AlsDataContext { get; set; }
    }
}
